package com.polaris;

import java.util.Collections;
import java.util.List;

/**
 * 快手类目赋值接口实现
 * 快手类目只有二级，因此定义为 ChannelCategory
 */
public class KuaiShouCategoryParamSet implements CategoryParamSet<ChannelCategory> {

    @Override
    public void setCategoryField(ChannelCategory category) {
        this.setCategoryField(Collections.singletonList(category));
    }

    @Override
    public void setCategoryField(List<ChannelCategory> categories) {
        for (ChannelCategory channelCategory : categories) {
            channelCategory.bindOneName("channelCategory 一级类目名称");
            channelCategory.bindTwoName("channelCategory 二级类目名称");
        }
    }

    //@Override
    //public void setCategoryField(List<? extends ChannelCategory> categories) {
    //    for (ChannelCategory channelCategory : categories) {
    //        channelCategory.bindOneName("channelCategory 一级类目名称");
    //        channelCategory.bindTwoName("channelCategory 二级类目名称");
    //    }
    //}

}
